<template>
  <div class="setting-center_mall-shop-setting_counters-activities">
    <div class="activities-title">
      <img src="../../../../assets/settingCenter/mallShopSetting/close.png" class="activities-title-icon">
      <label class="heading">{{ params.title }}</label>
      <label class="tips">{{ params.tips }}</label>
    </div>
    <div class="discount-info">
      <img src="../../../../assets/settingCenter/mallShopSetting/close.png" class="discount-info-icon">
      <label class="heading">{{ params.discountTitle }}</label>
    </div>
    <div class="counters-activities-content">
      <div v-if="type === 0" class="banner-info">
        <img src="../../../../assets/settingCenter/mallShopSetting/test.jpg" class="banner-info-img">
        <img src="../../../../assets/settingCenter/mallShopSetting/test.jpg" class="banner-info-img">
      </div>
      <div v-if="type === 1" class="leaflet-info" />
      <div v-if="type === 2" class="commodity-info">
        <div class="commodity-item">
          <img src="../../../../assets/settingCenter/mallShopSetting/test.jpg" class="commodity-img">
          <label class="commodity-name">xxxxxxxxx高跟鞋</label>
          <div class="commodity-bottom-info">
            <div class="commodity-bottom-info-price">
              <label class="commodity-price">￥2625</label>
              <label class="commodity-original-price">价格:3750</label>
            </div>
            <div class="commodity-bottom-info-button">立即购买</div>
          </div>
        </div>
        <div class="commodity-item">
          <img src="../../../../assets/settingCenter/mallShopSetting/test.jpg" class="commodity-img">
          <label class="commodity-name">xxxxxxxxx高跟鞋</label>
          <div class="commodity-bottom-info">
            <div class="commodity-bottom-info-price">
              <label class="commodity-price">￥2625</label>
              <label class="commodity-original-price">价格:3750</label>
            </div>
            <div class="commodity-bottom-info-button">立即购买</div>
          </div>
        </div>
        <div class="commodity-item">
          <img src="../../../../assets/settingCenter/mallShopSetting/test.jpg" class="commodity-img">
          <label class="commodity-name">xxxxxxxxx高跟鞋</label>
          <div class="commodity-bottom-info">
            <div class="commodity-bottom-info-price">
              <label class="commodity-price">￥2625</label>
              <label class="commodity-original-price">价格:3750</label>
            </div>
            <div class="commodity-bottom-info-button">立即购买</div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    type: {
      required: true,
      type: Number
    },
    params: {
      type: Object,
      required: true
    }
  }
}
</script>

<style lang="scss">
.setting-center_mall-shop-setting_counters-activities {
  padding: 10px;
  .activities-title {
    display: flex;
    align-items: center;
    .activities-title-icon {
      width: 10px;
      margin-right: 5px;
      height: 10px;
    }
    .heading {
      font-weight: 700;
      font-size: 15px;
      margin-right: 10px;
    }
    .tips {
      font-size: 12px;
      color: #DEDEDE;
    }
  }
  .discount-info {
    margin-top: 5px;
    .discount-info-icon {
      width: 10px;
      height: 10px;
      margin-right: 5px;
    }
    .heading {
      font-size: 13px;
    }
  }
  .counters-activities-content {
    .banner-info {
       display: flex;
       flex-direction: column;
       align-items: center;
       .banner-info-img {
         border-radius: 50px;
         width: 100%;
         height: 100px;
         margin: 10px 0;
       }
    }
  }
  .commodity-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
    .commodity-item {
      display: flex;
      flex-direction: column;
      width: calc((100% - 10px) / 2);
      margin-bottom: 10px;
      .commodity-img {
        height: 100px;
        width: 100%;
      }
      .commodity-name {
        font-size: 15px;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
        margin: 10px 0 5px;
      }
      .commodity-bottom-info {
        display: flex;
        align-items: center;
        justify-content: space-between;
        .commodity-bottom-info-price {
          display: flex;
          align-items: center;
          flex-direction: column;
          .commodity-price {
            font-size: 16px;
            color: #A4DCDB;
          }
          .commodity-original-price {
            font-size: 13px;
            text-decoration:line-through;
          }
        }
      }
      .commodity-bottom-info-button {
        background: #A4DCDB;
        color: #fff;
        font-size: 14px;
        padding: 3px 10px;
        border-radius: 20px;
      }
    }
    .commodity-item:nth-child(odd) {
      margin-right: 10px;
    }
  }
}
</style>
